package main

import (
	"github.com/apache/dubbo-go/config"
	"jkgo/jk/jklog"
)

func init() {
	config.SetProviderService(new(UserManager))
}

type UserManager struct {
}

func (u *UserManager) UserAdd(name, phone string) (*User, error) {
	jklog.L().Infoln("user add name ", name, ", phone ", phone)
	uu := &User{}
	return uu, nil
}

func (u *UserManager) UserDel(name, phone string) error {
	jklog.L().Infoln("user del name ", name)
	return nil
}

func (u *UserManager) UserFind(name, phone string) ([]*User, error) {
	jklog.L().Infoln("user find name ", name)
	return nil, nil
}

func (u *UserManager) Reference() string {
	return "UserManager"
}
